﻿//-----------------------------------------------------------------------
// <copyright file="DefaultFontSettingsProvider.cs" author="Artak Mkrtchyan">
//     Creative Commons - GNU General Public License (http://creativecommons.org/licenses/GPL/2.0/
// </copyright>
// <author>Artak Mkrtchyan</author>
// <email>mkArtak@gmail.com</email>
// <date>09/04/2013</date>
//-----------------------------------------------------------------------

using ConsoleHoster.Common.Model;
using ConsoleHoster.Common.Utilities;
using ConsoleHoster.Common.Utilities.Threading;
using ConsoleHoster.View.Popups;

namespace ConsoleHoster.Model
{
	internal class DefaultFontSettingsProvider : GenericSettingsProvider<FontsView, FontSettings, FontSettings>, IFontSettingsProvider
	{
		public DefaultFontSettingsProvider(IDispatcher argDispatcher, ViewSettings argViewSettings, ILogger argLogger)
			: base(argDispatcher, argViewSettings, new ComponentLogger("DefaultFontSettingsProvider", argLogger))
		{
		}

		protected override FontsView CreateView(FontSettings argCurrentState)
		{
			return new FontsView(this.Dispatcher, argCurrentState, this.Logger);
		}

		protected override FontSettings RetrieveDataFromView()
		{
			return this.view.ViewModel.GetSettings();
		}
	}
}
